<template>
	<view class="all">
		<!-- 顶部轮播图 -->
		<view class="top">
			<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" circular="true">
				<swiper-item v-for="(val, index) in applyData[0].values" :key="val.id" @tap="openUrl(val.url)">
					<view class="swiper-item"><image :src="val.imageurl" mode="aspectFill"></image></view>
				</swiper-item>
			</swiper>
		</view>
		<view v-for="(val,index) in applyData" :key='index' v-if="index!=0">
			<!-- 热门推荐 -->
			<view class="hot">{{val.name}}</view>
			<view class="box">
				<view class="common" v-for="item in val.values" :key='item.id' @tap="$open('./downLoad?mysrc=' + item.url)">
					<!-- 左侧区域 -->
					<image :src="item.imageurl" mode="aspectFill"></image>
					<!-- 右侧区域 -->
					<view class="right">
						<view class="name">{{ item.name }}</view>
						<!-- 游戏平台 -->
						<view class="game_pingtai">{{ item.content }}</view>
					</view>

					<!-- 定位的小图标 -->
					<image src="../../static/user/right_arr.png" mode="" class="postion"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			applyData: {}
		};
	},
	created() {
		this.biGameList();
	},
	methods: {
		biGameList() {
			this.$ajax('bi/biGameList', {}, 'POST').then(res => {
				this.applyData = res.data;
			});
		}
	}
};
</script>

<style lang="scss">
swiper,
.swiper-item {
	border-radius: 6rpx;
}
.hot {
	margin: 50rpx 0rpx 32rpx 32rpx;
	font-size: 38rpx;
	font-weight: bold;
	color: #333333;
}
.all {
	background-color: #f1f1f1;
	min-height: 100%;
}

.box {
	background-color: #fff;
	margin: 20rpx;
	border-radius: 16rpx;
}

.top {
	text-align: center;
	padding: 10rpx 30rpx;
	background: #ffffff;
	image {
		width: 690rpx;
		height: 280rpx;
		border-radius: 12rpx;
	}
}

.hot {
	margin: 40rpx 0 30rpx 32rpx;
	font-size: 30rpx;
	font-family: PingFang SC;
	font-weight: bold;
	color: rgba(51, 51, 51, 1);
}

.Bet {
	display: flex;
	justify-content: space-between;
	margin: 40rpx 30rpx;
	flex-wrap: wrap;
	image {
		width: 320rpx;
		height: 165rpx;
		border-radius: 12rpx;
		margin-bottom: 20rpx;
	}
}

.hot_new {
	margin-left: 30rpx;

	text {
		margin-right: 21rpx;
	}
}

.hot_new text:nth-child(1) {
	font-size: 30rpx;
	font-family: PingFang SC;
	font-weight: bold;
	color: rgba(2, 151, 254, 1);
}

.hot_new text:last-child {
	font-size: 30rpx;
	font-family: PingFang SC;
	font-weight: bold;
	color: rgba(153, 153, 153, 1);
}

.common {
	position: relative;
	display: flex;
	align-items: center;
	margin-left: 30rpx;
	border-bottom: 1rpx solid #e0e0e0;

	image {
		width: 106rpx;
		height: 106rpx;
		border-radius: 32rpx;
	}

	.right {
		margin-left: 30rpx;
		height: 180rpx;
		width: 580rpx;
		display: flex;
		justify-content: center;
		flex-direction: column;
		.name {
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: rgba(51, 51, 51, 1);
		}

		.game_pingtai {
			margin-top: 16rpx;
			font-size: 24rpx;
			font-weight: 500;
			color: rgba(102, 102, 102, 1);
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
			width: 500rpx;
		}

		.user {
			margin-top: 16rpx;
			font-size: 20rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: rgba(102, 102, 102, 1);
		}

		.number {
			margin-top: 30rpx;
			margin-right: 30rpx;
			display: flex;
			flex: 1;
			justify-content: space-between;
			align-items: center;
			.num {
				width: 55rpx;
			}
			.left_number,
			.right_nubmer {
				display: flex;
				align-items: center;
				view {
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: bold;
					color: rgba(51, 51, 51, 1);
				}
				image {
					margin-right: 10rpx;
					width: 18rpx;
					height: 10rpx;
				}
				text {
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: bold;
					color: rgba(77, 184, 114, 1);
				}
			}
		}
	}
	.postion {
		top: 0rpx;
		right: 50rpx;
		width: 12rpx;
		height: 24rpx;
		position: relative;
	}
}

.user text:nth-child(2) {
	margin-left: 150rpx;
}

.number_left text:nth-child(1) {
	margin-right: 120rpx;
}

.left_number {
	display: flex;
	justify-content: flex-end;
	width: 202rpx;
}

.set {
	margin-right: 4rpx;
	width: 120rpx;
	text-align: left;
}
</style>
